package com.ddxcloud.movie.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ddxcloud.movie.data.dto.ConfirmOrderDTO;
import com.ddxcloud.movie.data.dto.CreateOrderDTO;
import com.ddxcloud.movie.data.dto.PageDTO;
import com.ddxcloud.movie.data.entity.Order;
import com.ddxcloud.movie.data.dto.OrderDetailsDTO;
import com.ddxcloud.movie.data.entity.PaymentOrder;
import com.ddxcloud.movie.data.vo.OrderVO;

import javax.servlet.http.HttpServletRequest;
import java.util.concurrent.CompletableFuture;

public interface OrderService extends IService<Order> {

    CompletableFuture<Order> createOrder(CreateOrderDTO dto, HttpServletRequest servletRequest);

    Boolean confirmOrder(ConfirmOrderDTO dto);

    String notify(OrderDetailsDTO dto, HttpServletRequest request);

    IPage<OrderVO> getOrderList(PageDTO dto);

    OrderVO getOrderInfo(Long orderId);

    Boolean updateOrderForPaySuccess(String orderId, PaymentOrder paymentOrder, HttpServletRequest request);
}
